#ifndef GTL_FORMATS_HEADER_GUARD
#define GTL_FORMATS_HEADER_GUARD

#include "gtlStructures.h"
#include "gtlStrings.h"

namespace GTL
{
	namespace Formats
	{
		struct Wilson
		{ 
			typedef Structures::DataNodeWilson DataNodeType; 
			
			template <typename T> static eastl::string GetRepresentation(T type);
			
			template <> static eastl::string GetRepresentation<int>(int i)
			{
				return GTL::Strings::Just::IntToString(i);
			}

			static int FormatID() { return 'wils'; }
			static const char* FileExtension() { return "wilson"; }
		};

		struct GEncode
		{
			typedef Structures::DataNodeGEncode DataNodeType;

			static int FormatID() { return 'genc'; }
			static const char* FileExtension() { return "gencode"; }
		};

		struct AutoDetect
		{
			static const int FormatID = 'auto';
			static const char* FileExtension() { return "*"; }
		};

		Structures::DataNode* GetNewNode(int format);
		int DetectFormatFromFilename( const char* filename );
		Structures::DataNode* LoadNodeFromFile( const char* filename, int fileformat = Formats::AutoDetect::FormatID );

	}
}

#endif 